package io.qar.commons.mybatis.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.qar.commons.tools.utils.DateUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
public class CreateAndUpdatedDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern= DateUtils.DATE_TIME_PATTERN)
    @DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createdAt;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern=DateUtils.DATE_TIME_PATTERN)
    @DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date updatedAt;
}
